﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SilkeyERP.Model
{
    public partial class SalesPriceList
    {
        public void SetNextAvailableSalesPriceList()
        {
            using (var context = new SilkeyERPEntities())
            {
                this.PriceListCode = context.SalesPriceList.OrderBy(x => x.PriceListCode).ToList().Last().PriceListCode + 1;
            }
        }
    }
}
